<?php echo $this->Session->flash(); ?>

<?php
echo $form->create('EvaluationAnnex');
echo $form->hidden("EvaluationAnnex.evaluation_appraisal_id");
echo $form->hidden("EvaluationAnnex.id");
?>
<table >
    <thead>
        <tr>
            <th>Tipo de dato</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Item</td><td><?php echo $form->input("EvaluationAnnex.item", array('label' => '', 'options' => array('empty' => 'Sin registro', 'Construcción' => 'Construcción', 'Cultivo' => 'Cultivo', 'Anexo' => 'Anexo'))); ?></td>
        </tr>
        <tr>
            <td>Magnitud</td><td><?php echo $form->input("EvaluationAnnex.magnitud", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Valor unitario ($/unidad)</td><td><?php echo $form->input("EvaluationAnnex.valor_unitario", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>¿Es mejora útil?</td><td><?php echo $form->input("EvaluationAnnex.mejora_util", array('label' => '', 'options' => array('SI' => 'SI', 'NO' => 'NO'))); ?></td>
        </tr>
        <tr>
            <td>Unidad de medida</td><td><?php echo $form->input("EvaluationAnnex.unidad_medida", array('label' => '', 'options' => array('empty' => 'Tipo de medida', 'm' => 'm', 'm2' => 'm2', 'm3' => 'm3', 'Unidad' => 'Unidad', 'ha' => 'ha'))); ?></td>
        </tr>
        <tr>
            <td>Descripción</td><td><?php echo $form->input("EvaluationAnnex.descripcion", array('label' => '', 'class' => 'txtarea')); ?></td>
        </tr>
        <tr>
            <td colspan="2">
                <?php
                if ($this->Session->read('estado') == 0)
                    echo $ajax->submit('Guardar', array('url' => array('controller' => 'EvaluationAnnexes', 'action' => 'edit', $this->data['EvaluationAnnex']['id']), 'update' => 'content', 'indicator' => 'loading'));
                ?>
            </td>
        </tr>
    <tbody>
</table>

<?php echo $form->end(); ?>

<table width="100%" border="0"  CellSpacing=10  align="center" >
    <tbody>
        <tr>
            <td><?php echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'EvaluationAnnexes', 'action' => 'index', $this->data['EvaluationAnnex']['evaluation_appraisal_id']), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false)); ?></td>
        </tr>
    </tbody>
</table>